<%--
  Created by IntelliJ IDEA.
  User: VEGA
  Date: 2022/2/22
  Time: 18:47
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
    <title>Title</title>
</head>
<head>
    <meta charset="UTF-8">
    <title>修改手机</title>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/adduser.css"/>
</head>
<body>
<div class="bg">
    <div class="logo lfet"></div>
    <div class="font lfet">
        修改手机>>>
    </div>
    <div class="wizard right">
        <form action="${pageContext.request.contextPath}/phone/update.do?id=${requestScope.phone.id}" method="post">
            <div class="content">
                <div class="col">
                    <div class="form-group">
                        <label class="lfet">手机名称:</label>
                        <input name="name" value="${requestScope.phone.name}" type="text" class="form-control error inp-bg1 left"  style="outline:none;">
                    </div>
                    <div class="form-group" >
                        <label style="text-align: left;">是否有货:</label>
                       <input name="state" type="radio" style="outline:none;" value="1"  <c:if test="${requestScope.phone.state==1}">checked="checked"</c:if>><span>有货</span>
                        <input name="state" type="radio" style="outline:none;" value="0" <c:if test="${requestScope.phone.state==0}">checked="checked"</c:if>><span>无货</span>
                    </div>
                    <div class="form-group">
                        <label class="lfet">价格:</label>
                        <input name="price" value="${requestScope.phone.price}" type="text" class="form-control error dh" style="outline:none;">
                    </div>
                    <div class="form-group">
                        <label class="lfet">品牌:</label>
                        <select  name="bid" class="form-control error map"  style="outline:none;height: 30px;width: 300px;" >
                            <c:forEach items="${requestScope.brands}" var="brand" >
                            <option
                                    <c:if test="${requestScope.phone.bid==brand.id}">
                                        selected="selected"
                                    </c:if>
                                    value="${brand.id}">
                                    ${brand.name}
                            </option>
                            </c:forEach>
                        </select>
                    </div>
                    <div class="bottom" style="text-align: center;">
                        <!-- 这个button也可以提交表单，不需要改成submit -->
                        <button style="text-align: center;">提 交</button>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>
</body>
</html>
